import React from 'react';
import { Breadcrumb as AntdBreadcrumb } from 'antd';
import type { BreadcrumbProps as AntdBreadcrumbProps } from 'antd';
import { createStyles } from 'antd-style';

export interface BreadcrumbProps extends AntdBreadcrumbProps {
  /**
   * @description 自定义样式类名
   */
  customClassName?: string;
}

const useStyles = createStyles(({ token, css }) => ({
  breadcrumb: css`
    color: ${token.colorTextSecondary};
  `,
}));

const Breadcrumb: React.FC<BreadcrumbProps> = ({ customClassName, className, ...restProps }) => {
  const { styles, cx } = useStyles();
  
  const breadcrumbClassName = cx(
    className,
    customClassName,
    styles.breadcrumb
  );

  return <AntdBreadcrumb className={breadcrumbClassName} {...restProps} />;
};

export { Breadcrumb };
export default Breadcrumb;

